//pta B1081
#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;cin>>n;
	string s;getline(cin,s);//先写一次，消除换行的影响
	while(n--){
		getline(cin,s);
		bool flag1,flag2,flag3,flag4;
		flag1=flag2=flag3=flag4=false;//这样写是正确的
		if(s.size()<6) flag1=true;
		for(int i=0;i<s.size();i++){
			if(s[i]>='a'&&s[i]<='z') {flag3=true;continue;}
			if(s[i]>='A'&&s[i]<='Z') {flag3=true;continue;}
			if(s[i]>='0'&&s[i]<='9') {flag4=true;continue;}
			if(s[i]=='.') continue;
			flag2=true;
		}
		if(flag1) cout<<"Your password is tai duan le."<<endl;
		else if(!flag1&&flag2) cout<<"Your password is tai luan le."<<endl;
		else if(!flag1&&!flag4&&flag3) cout<<"Your password needs shu zi."<<endl;
		else if(!flag1&&!flag3&&flag4) cout<<"Your password needs zi mu."<<endl;
		else cout<<"Your password is wan mei."<<endl;
		
	}
} 